//
//  FourthViewController.m
//  BeanTrip
//
//  Created by dlios on 15-6-29.
//  Copyright (c) 2015年 PandaGroup. All rights reserved.
//

#import "FourthViewController.h"

#import "VideoViewController.h"
#import "JokeViewController.h"
#import "CollectionVC.h"

#define WIDTH ([UIScreen mainScreen].bounds.size.width)
#define HEIGHT ([UIScreen mainScreen].bounds.size.height)
@interface FourthViewController ()<UITextFieldDelegate>

@end

@implementation FourthViewController

- (void)dealloc
{

    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor=[UIColor whiteColor];
    
    self.navigationController.navigationBarHidden = NO;
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"设置" style:UIBarButtonItemStylePlain target:self action:@selector(presentLeftMenuViewController:)];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"收藏" style:UIBarButtonItemStylePlain target:self action:@selector(collectionAction:)];
    
    //视频的跳转按钮
    UIButton *videoButton = [UIButton buttonWithType:UIButtonTypeCustom];
    videoButton.frame = CGRectMake(10, 10, WIDTH - 20, HEIGHT/3);
    [videoButton setBackgroundImage:[UIImage imageNamed:@"movie"] forState:UIControlStateNormal];
    //圆角
    videoButton.layer.masksToBounds = YES;
    videoButton.layer.cornerRadius = 8.0;
    videoButton.layer.borderWidth = 1.0;
    videoButton.layer.borderColor = [[UIColor whiteColor]CGColor];
    [videoButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [videoButton addTarget:self action:@selector(videoAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:videoButton];
    
    //不得姐跳转按钮
    UIButton *jokeButton = [UIButton buttonWithType:UIButtonTypeCustom];
    jokeButton.frame = CGRectMake(10, HEIGHT/3 + 20, WIDTH - 20, HEIGHT/3);
    jokeButton.backgroundColor = [UIColor cyanColor];
    [jokeButton setBackgroundImage:[UIImage imageNamed:@"cont"] forState:UIControlStateNormal];
    //圆角
    jokeButton.layer.masksToBounds = YES;
    jokeButton.layer.cornerRadius = 8.0;
    jokeButton.layer.borderWidth = 1.0;
    jokeButton.layer.borderColor = [[UIColor whiteColor]CGColor];
    [jokeButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [jokeButton addTarget:self action:@selector(jokeAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:jokeButton];
    
}
//视频的按钮执行方法
- (void)videoAction:(UIButton *)button
{
    VideoViewController *videoVC = [[VideoViewController alloc] init];
    [self.navigationController pushViewController:videoVC animated:YES];
    [videoVC release];
}
//不得姐的按钮执行方法
- (void)jokeAction:(UIButton *)button
{
    JokeViewController *jokeVC = [[JokeViewController alloc] init];
    [self.navigationController pushViewController:jokeVC animated:YES];
    [jokeVC release];
}
- (void)collectionAction:(UIBarButtonItem *)barButton
{
    CollectionVC *collection = [[CollectionVC alloc] init];
    [self.navigationController pushViewController:collection animated:YES];
    [collection release];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {/Users/houlei/BeanTrip/BeanTrip/Base/Controller/individual/JokeCollectionViewCell.h
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
